package cn.hyman.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Topic;

@Configuration
public class ActiveMQConfig {
    @Value("${myTopicName}")
    private String toPicName;

    @Bean
    public Topic myTopic() {
        return new ActiveMQTopic(toPicName);
    }

}
